<?php 

namespace Acme\UserBundle\Form\CustomFieldType;
 
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class UserCategoryType extends AbstractType
{
	public function getParent(array $options)
	{
		return 'choice';
	}
	
    private $userCategoryChoices;

    public function __construct(array $userCategoryChoices)
    {
        $this->userCategoryChoices = $userCategoryChoices;
    }

    public function getDefaultOptions(array $options)
    {
        return array(
				'choices' => $this->userCategoryChoices,
	        	'label' => '用户类型',
	        	'empty_value' => '请选择',
        );
    }

    public function getName()
    {
    	return 'user_category';
    }
	
}